package com.example.superyi.myteam.mvvmPro;


import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;

import com.example.superyi.myteam.roomPro.entityPro.AuthorEntity;
import com.example.superyi.myteam.roomPro.repositoryPro.AuthorEntityRepository;

import java.util.List;

public class AuthorViewModel extends AndroidViewModel {
    private AuthorEntityRepository authorEntityRepository;

    public AuthorViewModel(@NonNull Application application) {
        super(application);
        authorEntityRepository = new AuthorEntityRepository(application);
    }

    public LiveData<List<AuthorEntity>> getOwnAuthorEntity(String id){
        return authorEntityRepository.getAuthorEntityById(id);
    }
}
